|
|
|
|
|
|
|
Figure 15.11.
Certain types of applications require multiple months displayed
at the same time. |
|
|
|
|
|
|
|
|
Clicking the arrow buttons at the top of the control would scroll the next six months or the previous six months into view. However, you can see that this takes up large amounts of space on the form. |
|
|
|
|
|
|
|
|
Besides the standard type of formatting properties to modify the background and foreground colors of the control, you can also specify which day of the week will appear as the first day by changing the value of the StartOfWeek property. In addition, the ShowWeekNumbers property specifies if week numbers will be displayed in a separate column on the control. Finally, the current date can be displayed at the bottom of the control by setting the ShowToday property to True. Any day's number on the control can have its font set to bold by using the GetDayBold event. This allows you to draw the user's attention to specific dates (such as holidays, vacations, etc.). To bold all of the Sundays on a controleven when new months are scrolled into viewadd the following code to the mvDate_GetDayBold event routine in the demo form: |
|
|
|
|
|
|
|
|
Dim I As Integer
I = vbSunday
While I < Count
State(I mvDate.StartOfWeek) = True
I = I + 7
Wend |
|
|
|
|
|